package com.sp.system.user.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

@Data
@TableName(value = "sp_user")//指定表名
public class User extends SuperEntity {
    private String userName;    //用户名
    private String password;    //密码
    private String loginName;   //登录名
    private Integer status;     //状态
    private Integer mobile;     //手机号
    private String emile;       //邮件
    @TableField(exist = false)
    private List<Role> roles;   //角色

    public User() {
    }

    public User(String id, String name, String password, Integer status, Integer mobile, String emile) {
        this.id = id;
        this.loginName = name;
        this.password = password;
        this.status = status;
        this.mobile = mobile;
        this.emile = emile;
    }
}
